import requests
from lxml import etree



response = requests.get(root,headers=headers)
print(response.text)

#数据抽取
html = etree.HTML(response.text)#渲染
title = html.xpath('//ht/text()')[0]
asrc = html.xpath

for src in asrc:
    href = asrc.get('href')
    chapter=src.text
    f.write(chapter+'\n')
    print(href,chapter)
    url="https://doupocangqiong1.com"+href
    resp = requests.get(url,headers=headers)
    html = etree.HTML(resp.text)#渲染
    aid = html.xpath()
    #https://doupocangqiong1.com/user/mark/add.html?novelid=1&cid=873530
    id=aid[0].split("=")[-1]#获取id值，按照等号分割取最后一个

    data = {
        'siteid': '0',
        'bid': '1',
        'cid': 'id'
    }
    response = requests.post